package com.ruoyi.websocket;

import com.ruoyi.common.security.config.ApplicationConfig;
import org.springframework.context.ApplicationContext;

/**
 * @author : Xuzhaobo
 * @date : 2024-12-24 11:21
 * @description :
 **/
public class SpringContextUtil {
    private static ApplicationContext ac;
    public static <T> T getBean(Class<T>clazz){
        T bean = ac.getBean(clazz);
        return bean;
    }
    public static void setApplicationContext(ApplicationContext applicationContext) {
        ac = applicationContext;
    }


}
